package com.ruoyi.ucar.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.UCarBaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

/**
 * 消费记录对象 t_consume_data
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Data
@TableName("t_consume_data")
public class TConsumeData extends UCarBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    /** 关联客户UUID-指向客户主表 */
    @Excel(name = "客户主表主键UUID")
    @TableField("customer_uuid")
    private String customerUuid;

    /** 消费类型 */
    @TableField("consume_type")
    @Excel(name = "消费类型")
    private String consumeType;

    /** 订单编号 */
    @TableField("order_code")
    @Excel(name = "订单编号")
    private String orderCode;

    /** 消费金额 */
    @TableField("consume_money")
    @Excel(name = "消费金额")
    private BigDecimal consumeMoney;

    /** 客户余额 */
    @TableField("balance_money")
    @Excel(name = "客户余额")
    private BigDecimal balanceMoney;

    /** 消费日期时间 */
    @TableField("consume_datetime")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "消费日期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime consumeDatetime;

    /** 创建人 */
    @Excel(name = "创建人")
    @TableField("created_by")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("created_time")
    private Date createdTime;

    /** 更新人 */
    @Excel(name = "更新人")
    @TableField("updated_by")
    private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("updated_time")
    private Date updatedTime;

    /** 删除标志 */
    @Excel(name = "删除标志")
    @TableField("delete_flag")
    private Long deleteFlag;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("customerUuid", getCustomerUuid())
            .append("consumeType", getConsumeType())
            .append("orderCode", getOrderCode())
            .append("consumeMoney", getConsumeMoney())
            .append("balanceMoney", getBalanceMoney())
            .append("consumeDatetime", getConsumeDatetime())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deleteFlag", getDeleteFlag())
            .toString();
    }
}
